import requests

url = 'https://www.baidu.com'
response = requests.get(url)
#response.text是requests模块按照chardet模块推测出的编码字符集进行解码的结果
#网络传输的字符串都是bytes类型的，
# 所以response.text = response.content.decode('推测出的编码字符集')
#response.text 为 str
# response.content 为 bytes
print(response.text)
print('**************************************')
#response.content.decode() 默认为utf-8编码
print(response.content.decode())